//
//  LLHDTableHeaderView.m
//  WisdomCommunity
//
//  Created by Yahaong on 16/7/29.
//  Copyright © 2016年 zonten. All rights reserved.
//

#import "LLHDTableHeaderView.h"
#import "YHMarcros.h"

@interface LLHDTableHeaderView ()
@property(nonatomic, strong) UIImageView *backgroundImageView;
@property(nonatomic, strong) UIImageView *iconView;
@property(nonatomic, strong) UILabel *nameLabel;
@end
@implementation LLHDTableHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setupView];
    }
    return self;
}- (void)setupView
{
    self.backgroundImageView = [UIImageView new];
    self.backgroundImageView.image = [UIImage imageNamed:@"邻里互动6_"];
    [self addSubview:self.backgroundImageView];
    [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.trailing.leading.equalTo(self);
        make.bottom.equalTo(self).offset(-40);
    }];
    self.iconView = [UIImageView new];
    self.iconView.image = [UIImage imageNamed:@"邻里互动_"];
    [self addSubview:self.iconView];
    [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.equalTo(70);
        make.trailing.equalTo(self).offset(-15);
        make.centerY.equalTo(self.backgroundImageView.bottom);
    }];
    self.nameLabel = [UILabel new];
    self.nameLabel.text = @"功夫熊猫";
    self.nameLabel.textColor = [UIColor whiteColor];
    self.nameLabel.textAlignment = NSTextAlignmentRight;
    self.nameLabel.font = [UIFont boldSystemFontOfSize:15];
    self.nameLabel.shadowColor  = RGBColor(153, 153, 153);
    self.nameLabel.shadowOffset =CGSizeMake(1,1);
    [self addSubview:self.nameLabel];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {

        make.trailing.equalTo(self.iconView.leading).offset(-20);
        make.bottom.equalTo(self.iconView).offset(-35);
        make.height.equalTo(20);
    }];

}
@end
